Skip to content

Conversation

nuttycom
Copy link
Contributor

@nuttycom nuttycom commented Sep 5, 2025

No description provided.

This reverts commit d492338.

This crate specifically parses zcashd wallets using `zcash_primitives
0.19` and its dependencies; introducing a second version of the
`incrementalmerkletree` crates breaks compatibility with the
`zcash_primitives` version.
In `zcashd`, `mapSaplingNoteData` is always parsed if the transaction
version supports sapling; the implementation in `wallet_tx` parsing
incorrectly parsed it instead as a value wrapped in `std::optional`.
This causes an off-by-one error in the remainder of `CWalletTx` parsing,
but that error only appears sometimes because the `0x00` and `0x01`
discriminants for optional values are also valid vector lengths, so
transactions that did not include a Sapling component would not have a
parse error here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant